1. Field of the Invention
The present invention relates to a message-passing communication system suitable for inter-process communication which simultaneously uses plural communication paths. There are various kinds of inter-process communication, such as communication via TCP/IP, communication using a shared memory, and communication using specific hardware.
This application is based on Patent Application No. Hei 9-320003 filed in Japan, the contents of which are incorporated herein by reference.
2. Description of the Related Art
Japanese Patent Application, First Publication No. Hei 3-158947 shows an example of a conventional communication system. In this example, it is possible to simultaneously operate and dynamically switch plural communication processes (i.e., protocols) by using a communicating device, protocol control processing, and a unified application interface.
This conventional example is based on the premise that the addressee or receiver at the time of sending data and the addresser or sender at the time of receiving data are fixed and a communication path relating to the addressee at the time of sending data and a communication path relating to the addresser at the time of receiving data can be uniquely determined. That is, an operation for receiving data in the order of arrival without identifying the addresser is not considered.
In the above-described conventional example, when there are plural communication paths which can be simultaneously used, it is possible to simultaneously use these paths and dynamically change the path to be used. However, there have been the following problems:
(1) In the data receiving process, there are plural possible paths for receiving data, and it is necessary to monitor all the paths; thus, CPU resources are consumed via the monitoring operation even though data are not actually received.
(2) In the data receiving process, if each addresser is not designated and the receiving operation is performed depending on the order of receipt of data, the performance may not depend on the actual order of receiving but may depend on the order of monitoring each data.
In consideration of the above circumstances, the present invention relates to a communication system including plural communication paths which can be simultaneously used for inter-process communication, and an objective of the present invention is to provide a message-passing communication system by which data can be received in the order of receiving without predetermining the addressers, thereby avoiding undesirable consumption of CPU resources and dependence on the order of monitoring.
Therefore, the present invention provides a message-passing communication system for inter-process communication. The system comprises plural communication paths which can be simultaneously used and user memory areas for performing communication via the communication paths, wherein each user memory area includes:
one or more communication tasks, each communication task to monitor only one of the communication paths, interpret the communication protocol which is used for the monitored communication path, and to convert the communication protocol into a predetermined communication protocol when data is sent via the monitored communication path;
an arrival-data queuing unit for processing plural data in the order of arrival of the data and storing the data in a queue; and
a user task for extracting the data stored in the arrival-data queuing unit and for interpreting said predetermined communication protocol and executing a user application program using the extracted data.
Accordingly, the user task for executing a user application program can use or process the data queued in the arrival-data queuing unit from the head of the queue, without identifying the plural communication paths. In addition, the user task does not need to identify plural communication protocols because the communication protocol of the queued data after the conversion can be interpreted by the user task.
Consequently, data can be received in the order of receiving without predetermining the addressers, and thereby undesirable consumption of CPU resources and dependence on the order of monitoring can be avoided.